enum sm4_file
{
	SM4_FILE_TEMP,
	SM4_FILE_INPUT,
	SM4_FILE_OUTPUT,
	SM4_FILE_INDEXABLE_TEMP,
	SM4_FILE_IMMEDIATE32,
	SM4_FILE_IMMEDIATE64,
	SM4_FILE_SAMPLER,
	SM4_FILE_RESOURCE,
	SM4_FILE_CONSTANT_BUFFER,
	SM4_FILE_IMMEDIATE_CONSTANT_BUFFER,
	SM4_FILE_LABEL,
	SM4_FILE_INPUT_PRIMITIVEID,
	SM4_FILE_OUTPUT_DEPTH,
	SM4_FILE_NULL,
	SM4_FILE_RASTERIZER,
	SM4_FILE_OUTPUT_COVERAGE_MASK,
	SM4_FILE_STREAM,
	SM4_FILE_FUNCTION_BODY,
	SM4_FILE_FUNCTION_TABLE,
	SM4_FILE_INTERFACE,
	SM4_FILE_FUNCTION_INPUT,
	SM4_FILE_FUNCTION_OUTPUT,
	SM4_FILE_OUTPUT_CONTROL_POINT_ID,
	SM4_FILE_INPUT_FORK_INSTANCE_ID,
	SM4_FILE_INPUT_JOIN_INSTANCE_ID,
	SM4_FILE_INPUT_CONTROL_POINT,
	SM4_FILE_OUTPUT_CONTROL_POINT,
	SM4_FILE_INPUT_PATCH_CONSTANT,
	SM4_FILE_INPUT_DOMAIN_POINT,
	SM4_FILE_THIS_POINTER,
	SM4_FILE_UNORDERED_ACCESS_VIEW,
	SM4_FILE_THREAD_GROUP_SHARED_MEMORY,
	SM4_FILE_INPUT_THREAD_ID,
	SM4_FILE_INPUT_THREAD_GROUP_ID,
	SM4_FILE_INPUT_THREAD_ID_IN_GROUP,
	SM4_FILE_INPUT_COVERAGE_MASK,
	SM4_FILE_INPUT_THREAD_ID_IN_GROUP_FLATTENED,
	SM4_FILE_INPUT_GS_INSTANCE_ID,
	SM4_FILE_OUTPUT_DEPTH_GREATER_EQUAL,
	SM4_FILE_OUTPUT_DEPTH_LESS_EQUAL,
	SM4_FILE_CYCLE_COUNTER,
	SM4_FILE_COUNT
};

enum sm4_operarand_compnum
{
	SM4_OPERARAND_COMPNUM_COUNT
};

enum sm4_operand_compnum
{
	SM4_OPERAND_COMPNUM_0,
	SM4_OPERAND_COMPNUM_1,
	SM4_OPERAND_COMPNUM_4,
	SM4_OPERAND_COMPNUM_N,
	SM4_OPERAND_COMPNUM_,
	SM4_OPERAND_COMPNUM_COUNT
};

enum sm4_token_instruction_extended_type
{
	SM4_TOKEN_INSTRUCTION_EXTENDED_TYPE_EMPTY,
	SM4_TOKEN_INSTRUCTION_EXTENDED_TYPE_SAMPLE_CONTROLS,
	SM4_TOKEN_INSTRUCTION_EXTENDED_TYPE_RESOURCE_DIM,
	SM4_TOKEN_INSTRUCTION_EXTENDED_TYPE_RESOURCE_RETURN_TYPE,
	SM4_TOKEN_INSTRUCTION_EXTENDED_TYPE_COUNT
};

enum sm4_interpolation
{
	SM4_INTERPOLATION_UNDEFINED,
	SM4_INTERPOLATION_CONSTANT,
	SM4_INTERPOLATION_LINEAR,
	SM4_INTERPOLATION_LINEAR_CENTROID,
	SM4_INTERPOLATION_LINEAR_NOPERSPECTIVE,
	SM4_INTERPOLATION_LINEAR_NOPERSPECTIVE_CENTROID,
	SM4_INTERPOLATION_LINEAR_SAMPLE,
	SM4_INTERPOLATION_LINEAR_NOPERSPECTIVE_SAMPLE,
	SM4_INTERPOLATION_COUNT
};

enum sm4_operand_index_repr
{
	SM4_OPERAND_INDEX_REPR_IMM32,
	SM4_OPERAND_INDEX_REPR_IMM64,
	SM4_OPERAND_INDEX_REPR_REG,
	SM4_OPERAND_INDEX_REPR_REG_IMM32,
	SM4_OPERAND_INDEX_REPR_REG_IMM64,
	SM4_OPERAND_INDEX_REPR_COUNT
};

enum sm4_sv
{
	SM4_SV_UNDEFINED,
	SM4_SV_POSITION,
	SM4_SV_CLIP_DISTANCE,
	SM4_SV_CULL_DISTANCE,
	SM4_SV_RENDER_TARGET_ARRAY_INDEX,
	SM4_SV_VIEWPORT_ARRAY_INDEX,
	SM4_SV_VERTEX_ID,
	SM4_SV_PRIMITIVE_ID,
	SM4_SV_INSTANCE_ID,
	SM4_SV_IS_FRONT_FACE,
	SM4_SV_SAMPLE_INDEX,
	SM4_SV_FINAL_QUAD_U_EQ_0_EDGE_TESSFACTOR,
	SM4_SV_FINAL_QUAD_V_EQ_0_EDGE_TESSFACTOR,
	SM4_SV_FINAL_QUAD_U_EQ_1_EDGE_TESSFACTOR,
	SM4_SV_FINAL_QUAD_V_EQ_1_EDGE_TESSFACTOR,
	SM4_SV_FINAL_QUAD_U_INSIDE_TESSFACTOR,
	SM4_SV_FINAL_QUAD_V_INSIDE_TESSFACTOR,
	SM4_SV_FINAL_TRI_U_EQ_0_EDGE_TESSFACTOR,
	SM4_SV_FINAL_TRI_V_EQ_0_EDGE_TESSFACTOR,
	SM4_SV_FINAL_TRI_W_EQ_0_EDGE_TESSFACTOR,
	SM4_SV_FINAL_TRI_INSIDE_TESSFACTOR,
	SM4_SV_FINAL_LINE_DETAIL_TESSFACTOR,
	SM4_SV_FINAL_LINE_DENSITY_TESSFACTOR,
	SM4_SV_COUNT
};

enum sm4_token_operand_extended_type
{
	SM4_TOKEN_OPERAND_EXTENDED_TYPE_EMPTY,
	SM4_TOKEN_OPERAND_EXTENDED_TYPE_MODIFIER,
	SM4_TOKEN_OPERAND_EXTENDED_TYPE_COUNT
};

enum sm4_opcode
{
	SM4_OPCODE_ADD,
	SM4_OPCODE_AND,
	SM4_OPCODE_BREAK,
	SM4_OPCODE_BREAKC,
	SM4_OPCODE_CALL,
	SM4_OPCODE_CALLC,
	SM4_OPCODE_CASE,
	SM4_OPCODE_CONTINUE,
	SM4_OPCODE_CONTINUEC,
	SM4_OPCODE_CUT,
	SM4_OPCODE_DEFAULT,
	SM4_OPCODE_DERIV_RTX,
	SM4_OPCODE_DERIV_RTY,
	SM4_OPCODE_DISCARD,
	SM4_OPCODE_DIV,
	SM4_OPCODE_DP2,
	SM4_OPCODE_DP3,
	SM4_OPCODE_DP4,
	SM4_OPCODE_ELSE,
	SM4_OPCODE_EMIT,
	SM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DERIV_RTX_COARSE,
	SM4_OPCODE_DERIV_RTX_FINE,
	SM4_OPCODE_DERIV_RTY_COARSE,
	SM4_OPCODE_DERIV_RTY_FINE,
	SM4_OPCODE_GATHER4_C,
	SM4_OPCODE_GATHER4_PO,
	SM4_OPCODE_GATHER4_PO_C,
	SM4_OPCODE_RCP,
	SM4_OPCODE_F32TOF16,
	SM4_OPCODE_F16TOF32,
	SM4_OPCODE_UADDC,
	SM4_OPCODE_USUBB,
	SM4_OPCODE_COUNTBITS,
	SM4_OPCODE_FIRSTBIT_HI,
	SM4_OPCODE_FIRSTBIT_LO,
	SM4_OPCODE_FIRSTBIT_SHI,
	SM4_OPCODE_UBFE,
	SM4_OPCODE_IBFE,
	SM4_OPCODE_BFI,
	SM4_OPCODE_BFREV,
	SM4_OPCODE_SWAPC,
	SM4_OPCODE_DCL_STREAM,
	SM4_OPCODE_DCL_FUNCTION_BODY,
	SM4_OPCODE_DCL_FUNCTION_TABLE,
	SM4_OPCODE_DCL_INTERFACE,
	SM4_OPCODE_DCL_INPUT_CONTROL_POINT_COUNT,
	SM4_OPCODE_DCL_OUTPUT_CONTROL_POINT_COUNT,
	SM4_OPCODE_DCL_TESS_DOMAIN,
	SM4_OPCODE_DCL_TESS_PARTITIONING,
	SM4_OPCODE_DCL_TESS_OUTPUT_PRIMITIVE,
	SM4_OPCODE_DCL_HS_MAX_TESSFACTOR,
	SM4_OPCODE_DCL_HS_FORK_PHASE_INSTANCE_COUNT,
	SM4_OPCODE_DCL_HS_JOIN_PHASE_INSTANCE_COUNT,
	SM4_OPCODE_DCL_THREAD_GROUP,
	SM4_OPCODE_DCL_UNORDERED_ACCESS_VIEW_TYPED,
	SM4_OPCODE_DCL_UNORDERED_ACCESS_VIEW_RAW,
	SM4_OPCODE_DCL_UNORDERED_ACCESS_VIEW_STRUCTURED,
	SM4_OPCODE_DCL_THREAD_GROUP_SHARED_MEMORY_RAW,
	SM4_OPCODE_DCL_THREAD_GROUP_SHARED_MEMORY_STRUC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PCODE_EVAL_CENTROID,
	SM4_OPCODE_DCL_GS_INSTANCE_COUNT,
	SM4_OPCODE_COUNT
};

enum sm4_operand_mode
{
	SM4_OPERAND_MODE_MASK,
	SM4_OPERAND_MODE_SWIZZLE,
	SM4_OPERAND_MODE_SCALAR,
	SM4_OPERAND_MODE_,
	SM4_OPERAND_MODE_COUNT
};

enum sm4_target
{
	SM4_TARGET_UNKNOWN,
	SM4_TARGET_BUFFER,
	SM4_TARGET_TEXTURE1D,
	SM4_TARGET_TEXTURE2D,
	SM4_TARGET_TEXTURE2DMS,
	SM4_TARGET_TEXTURE3D,
	SM4_TARGET_TEXTURECUBE,
	SM4_TARGET_TEXTURE1DARRAY,
	SM4_TARGET_TEXTURE2DARRAY,
	SM4_TARGET_TEXTURE2DMSARRAY,
	SM4_TARGET_TEXTURECUBEARRAY,
	SM4_TARGET_RAW_BUFFER,
	SM4_TARGET_STRUCTURED_BUFFER,
	SM4_TARGET_COUNT
};

